using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SkeletonAttackState : SkeletonState
{
    public SkeletonAttackState(Enemy enemyBase, Enemy_Skeleton enemy, StateMachine<EnemyState> stateMachine, string animBoolName) : base(enemyBase, enemy, stateMachine, animBoolName)
    {
    }

    public override void Enter()
    {
        base.Enter();
    }

    public override void Exit()
    {
        base.Exit();
        enemy.lastAttackTime = Time.time;
    }

    public override void Update()
    {
        base.Update();
        enemy.SetZeroVelocity();
        if (triggerCalled) 
        {
            stateMachine.ChangeState(enemy.battleState);
        }
    }
}
